package cn.tedu.dfxd.controller;

import cn.tedu.dfxd.entity.Item;
import cn.tedu.dfxd.mapper.ItemMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.List;

/**
 * @author DBX
 * @effect
 * @date 2022/04/21/14:55
 */

@RestController
@CrossOrigin
@RequestMapping("/events")
public class EventsController {


    @Autowired
    ItemMapper itemMapper;

    @GetMapping("/recommendListCate")
    public List<Item> recommendListCate(){

      return itemMapper.recommendListCate();
    }

    @GetMapping("/priceMoreListCate")
    public List<Item> priceMoreListCate(){

        return itemMapper.priceMoreListCate();
    }


    @GetMapping("/rankingList")
    public List<Item> rankingList(){

        return itemMapper.rankingList();
    }

    @GetMapping("/menuList")
    public List<Item> menuList(){

        return itemMapper.menuList();
    }


}

